<template>
  <div class="nav-box" v-if="!hideNav">
    <div class="nav">
      <div class="nav-item" v-for="(item, index) in navData" :key="index">
        <div v-if="item.children.length>0" class="router-link" @click="handleNavClick(item)">
          <span class="iconfont">&#xe614;</span>{{item.title}}
        </div>
        <div v-if="item.children.length>0" class="item-chilren">
          <detail-list :list="item.children"></detail-list>
        </div>
        <router-link v-else :to="item.jump" class="router-link" :class="{ indent: item.children.length == 0}">{{item.title}}</router-link>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NavList'
}
</script>

<style scoped>

</style>
